﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Utils.Drawing
{
    public class ColorUtils
    {
        public static Color Interpolate(Color col1, Color col2, float per)
        {
            return new Color(
                (byte)(col1.R * (1 - per) + col2.R * per),
                (byte)(col1.G * (1 - per) + col2.G * per),
                (byte)(col1.B * (1 - per) + col2.B * per),
                (byte)(col1.A * (1 - per) + col2.A * per));
        }
    }
}
